;
(function( win ){
	// 获得 document 对象
	var doc = win.document;

	// 获得html标签
	var docEL = doc.documentElement;
	// console.log( doc )
	// console.log( docEL )

	var metaEL = doc.querySelector('meta[name="viewport"]');
	// console.log( metaEL )

	// viewport-fit=cover，设置页面占满整个屏幕
	metaEL.setAttribute("content", "initial-scale=.5, maximum-scale=.5, minimum-scale=.5, user-scalable=no viewport-fit=cover");

	function reRem(){
		// getBoundingClientRect()方法返回元素的大小及其相对于视口的位置
		var _width = docEL.getBoundingClientRect().width;
		// console.log( _width )

		var _rem = _width / 10;
		docEL.style.fontSize = _rem + 'px';
	}
	reRem();

	win.addEventListener('resize',function(){
		reRem();
	});


})( window )